package com.cms.work.service.impl.transaction;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cms.work.core.service.impl.BaseServiceImpl;
import com.cms.work.dao.transaction.IAccountDao;
import com.cms.work.entity.transaction.Account;
import com.cms.work.service.transaction.IAccountService;

/**
 * @describe 会员账户
 * @author YY
 * @version v1.0
 * @date 2016-11-24 21:02:49
 **/
@Service
public class AccountServiceImpl extends BaseServiceImpl<Account, Integer> implements IAccountService {
	
    @Autowired
    private IAccountDao accountDao;
	
	@Override
	public void save(Account account) {
	    if (account.getId() == null || account.getId() == 0) {
            accountDao.insertSelective(account);
        } else {
            accountDao.updateByPrimaryKeySelective(account);
        }
	}
}

